home *** CD-ROM | disk | FTP | other *** search
- unit AppLauncherU;
-
- interface
-
- uses
- Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
- StdCtrls, Buttons;
-
- type
- TForm1 = class(TForm)
- edtCommand: TEdit;
- SpeedButton1: TSpeedButton;
- edtParams: TEdit;
- Label1: TLabel;
- Label2: TLabel;
- btnLaunch: TButton;
- OpenDialog: TOpenDialog;
- procedure SpeedButton1Click(Sender: TObject);
- procedure btnLaunchClick(Sender: TObject);
- private
- { Private declarations }
- public
- { Public declarations }
- end;
-
- var
- Form1: TForm1;
-
- implementation
-
- uses RunCmd;
-
- {$R *.DFM}
-
- procedure TForm1.SpeedButton1Click(Sender: TObject);
- begin
- OpenDialog.FileName := edtCommand.Text;
- if OpenDialog.Execute then
- edtCommand.Text := OpenDialog.FileName
- end;
-
- procedure TForm1.btnLaunchClick(Sender: TObject);
- begin
- RunCommand(edtCommand.Text, edtParams.Text,
- Application.Minimize, Application.Restore)
- end;
-
- end.
-